//
//  MTButton.m
//  CoolTennisBall
//
//  Created by Coollang on 16/9/7.
//  Copyright © 2016年 CoolLang. All rights reserved.
//

#import "MTButton.h"
#import "UIView+Frame.h"

@implementation MTButton


- (void)layoutSubviews {
    [super layoutSubviews];
    
    
    [self.imageView sizeToFit];
    [self.titleLabel sizeToFit];

    CGFloat spaceH = (self.height - self.imageView.height - self.titleLabel.height) - 2;
    
    self.imageView.centerX = self.centerX;
    self.imageView.y = spaceH * 0.45;
    self.titleLabel.centerX = self.centerX;
    self.titleLabel.y = self.height - spaceH * 0.55 - self.titleLabel.height;
}

@end
